package com.dyc.caradvertisting.ui.fmt.tab.mine.child;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;

import com.dyc.caradvertisting.R;
import com.dyc.caradvertisting.ui.aty.login.LoginActivity;
import com.njh.tools.base.BaseFragment;
import com.njh.tools.common.phone.ToActivityUtil;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * 个人中心用户信息
 */
public class ClientFragment extends BaseFragment {
    @BindView(R.id.img_client)
    ImageView imgClient;

    public ClientFragment() {
        // Required empty public constructor
    }

    public static ClientFragment newInstance() {
        ClientFragment fragment = new ClientFragment();
        Bundle args = new Bundle();
        fragment.setArguments(args);
        return fragment;
    }

    @Override
    public int getLayoutId() {
        return R.layout.fragment_client;
    }

    @Override
    public void initView(View baseView) {
        ButterKnife.bind(this, baseView);
        imgClient.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
//                EventBus.getDefault().post(new StartBrotherEvent(FirstDetailFragment.newInstance()));
                ToActivityUtil.getInstance().toNext(ClientFragment.this.getContext(), LoginActivity.class);
            }
        });
    }

    @Override
    public void initPresenter() {

    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        // TODO: inflate a fragment view
        View rootView = super.onCreateView(inflater, container, savedInstanceState);
        ButterKnife.bind(this, rootView);
        return rootView;
    }
}
